package com.qfedu.knowledge.controller;

import com.qfedu.knowledge.entity.dto.BasePageDTO;
import com.qfedu.knowledge.entity.vo.ResultVO;
import com.qfedu.knowledge.service.IQuestionRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName QuestionRecordController
 * @Author ykx
 * @Date 2024/1/23 10:33
 * @Version 1.0
 */
@RestController
@CrossOrigin
@Slf4j
@RequestMapping("/record")
public class QuestionRecordController {

    @Autowired
    private IQuestionRecordService questionRecordService;

    @GetMapping("/list/{questionId}")
    public ResultVO getRecordList(@PathVariable Long questionId, BasePageDTO basePageDTO) {
        System.out.println("basePageDTO = " + basePageDTO);
        return ResultVO.success(questionRecordService.getRecordsList(basePageDTO, questionId));
    }


}
